Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

429
Visualizações
Getting allegedly randomly "No permission to send message to these tmIDs" HMS Push services

🟢 Fixed server-side

Note: this was a server side bug and for now seems to be solved. Our mobile app code remains unchanged.


I have to use HMS Push Services in order to make my RN App working for Huawei EMUI devices: HMS Core.

I followed all the required steps to install and configure HMS both on the server and on the mobile App.

However... I noticed a weird behavior. I use a button on the web page to send a Push Notification from the server to the Mobile App. I ensured that Push Kit is enabled on my Huawei ID and the Push Device Token is the correct one.

Sometimes the notification is sent and sometimes no. I tried all the day to find the cause, but for now it seems to be completely aleatory, at least until the cause will be not found.

Please note that in the code below the mc.send() goes every times into the .then() and never raised the .catch().

Sometimes I get: OK {"code":"80000000","msg":"Success","requestId":"161832746491754926000107"} and the notification is actually received from the Mobile App (all fine!).

Sometimes (and quite often): OK {"code":"80300002","msg":"No permission to send message to these tmIDs","requestId":"161832753512250325000107"}

Lastly, I am getting continuously: OK {"code":"80000000","msg":"Success","requestId":"161832795126307445060711"} but... the App does not receives actually the notification.

I tried to restart server, keep the App in the three various States (closed, foreground, background), but nothing helped me to find the problem.

This is the last version of the code I use to send the notification (I changed it many times):

function sendPushNotificationHMS(pushDeviceToken, data, attempt){
  hcm.init({
      appId: configHMS.AppId,
      appSecret: configHMS.AppSecret,
      authUrl: configHMS.AuthUrl,
      pushUrl: configHMS.PushUrl
  });
  let mc = hcm.messaging().messaging;

  let androidConfig = {
      collapse_key: -1,
      urgency:"HIGH",
      ttl: "10000s",
      bi_tag: "the_sample_bi_tag_for_receipt_service",
  }

  let message = {
      data: JSON.stringify(data),
      android: androidConfig,
      token: new Array(pushDeviceToken)
  };

  mc.send(message, true).then(data => {
      console.log('OK ', data);
  }).catch(err => {
      console.log('ERR ', err);
  });
}
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Please refer to this documentation:

https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/commonerror-0000001059816656

and see if one of the solution under 80300002 is correct. Since you have checked if your IDs are correct, please check the tips under 2, 4, 6, and 7.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda